package com.gitee.neuray.security.admin.staff.rpc;

import com.gitee.neuray.security.admin.api.AdminStaffApi;
import com.gitee.neuray.security.admin.dto.AdminOrgDto;
import com.gitee.neuray.security.admin.dto.AdminRoleDto;
import com.gitee.neuray.security.admin.dto.StaffDto;
import com.gitee.neuray.security.admin.org.entity.AdminOrgEntity;
import com.gitee.neuray.security.admin.staff.biz.StaffBiz;
import com.gitee.neuray.security.admin.staff.vo.StaffOrg;
import com.gitee.neuray.security.admin.staff.vo.StaffVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class AdminStaffRest implements AdminStaffApi {

    @Autowired
    private StaffBiz staffBiz;

    @Override
    public List<StaffDto> findStaffByOrgId(String id) {
        return staffBiz.findStaffByOrgId(id);
    }

    @Override
    public StaffDto findStaffById(String id) {
        return staffBiz.findStaffById(id);
    }

    @Override
    public AdminOrgDto findOrgById(String id) {
        return staffBiz.findOrgById(id);
    }

    @Override
    public AdminOrgDto findOrgByOrgName(String ORG_NAME) {
        return staffBiz.findOrgByOrgName(ORG_NAME);
    }

    @Override
    public StaffDto findStaffByName(String NAME) {
        return staffBiz.findStaffByName(NAME);
    }

    @Override
    public List<Map> findRoleByUserId(String id) {
        return staffBiz.findRoleByUserId(id);
    }
}
